import _ from 'lodash'

export default function ({ store }) {
  const initState = _.cloneDeep((store.$state))
  store.$reset = () => {
    store.$patch(_.cloneDeep(initState))
  }
}